
    <form class="checkoutform" action="{:U('update')}" method="post">

      <input type="hidden" name="shipping_id" value="{$info.shipping_id}">
  
      <input type="hidden" name="id" value="{$info.id}">
  <div class="form-group">
      <label class="control-label">地区</label>
      <div>
         <span id="areabox"></span>
      </div>
   </div>
     <div class="form-group">
      <label class="control-label">物流名称</label>
      <div>
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="物流名称">
      </div>
   </div>
      
<div class="form-group">
      <label class="control-label">首重</label>
      <div>
         <input class="form-control" name="firstweight" value="{$info.firstweight}" type="text" placeholder="首重">
      </div>
   </div>
      <div class="form-group">
      <label class="control-label">首重费用</label>
      <div>
         <input class="form-control" name="firstweightexpenses" value="{$info.firstweightexpenses}" type="text" placeholder="首重费用">
      </div>
   </div>
      
      <div class="form-group">
      <label class="control-label">续重费用</label>
      <div>
         <input class="form-control" value="{$info.extendweightexpenses}" name="extendweightexpenses" type="text" placeholder="续重费用【超出首重部分每kg收费多少】">
      </div>
   </div>
   
   
<div class="form-group">
      <label class="control-label">免费额度</label>
      <div>
         <input class="form-control" value="{$info.free}" name="free" type="text" placeholder="免费额度【金额满多少时免运费】">
      </div>
   </div>


   
      
  
    </form>

<script>
	
	$(document).ready(function(e) {
        
		<empty name="info['regionids']">
		$.ajax({
			url:"{:U('getRegion')}",
			data:"",
			type:"POST",
			dataType:"html",
			success: function(data){
				$('#areabox').html(data);
			}
		});
		
		<else/>
		
		
		$.ajax({
			url:"{:U('setRegion')}",
			data:"area={$info.regionids}",
			type:"POST",
			dataType:"html",
			success: function(data){
				$('#areabox').html(data);
			}
		});
		
		</empty>
    });
	function removnextAll(e){
		if($(e).next().length>0){
			removnextAll($(e).next());
			$(e).next().remove();
		}
	}
	function sendRegion(e){
		if(e.value>0){
			$.ajax({
			url:"{:U('getRegion')}",
			data:"fid="+e.value,
			type:"POST",
			dataType:"html",
				success: function(data){
					removnextAll(e);
					$(e).parent().append(data);
				}
		    });
	    }else{
		    removnextAll(e);
	    }
	    return false;
	}

</script>
